package com.cskaoyan.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
@Data
public class MallGoodsAttribute {
    private Integer id;

    private Integer goodsId;

    private String attribute;

    private String value;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date addTime;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private Boolean deleted;

    public void setAddTime(Date addTime) {
        if (addTime == null) {
            addTime = new Date();
        }
        this.addTime = addTime;
    }


    public void setUpdateTime(Date updateTime) {
        if (updateTime == null) {
            updateTime = new Date();
        }
        this.updateTime = updateTime;
    }
}